import request from '@/utils/request'

// 查询功能列表列表
export function listFunction(data) {
  return request({
    url: '/mis/function/list',
    method: 'post',
    data: data
  })
}

// 查询功能列表详细
export function getFunction(ctFunNo) {
  return request({
    url: '/mis/function/' + ctFunNo,
    method: 'get'
  })
}


// 获取基础功能详细
export function getBaseFunction(ctFunNo) {
  return request({
    url: '/mis/function/base/' + ctFunNo,
    method: 'get'
  })
}

// 查询功能列表详细
export function tabeleColumn(tableNameKey) {
  return request({
    url: '/mis/misTableInfo/tabeleColumn?tableNameKey=' + tableNameKey,
    method: 'get'
  })
}

// 新增功能列表
export function addFunction(data) {
  return request({
    url: '/mis/function',
    method: 'post',
    data: data
  })
}

// 修改功能列表
export function updateFunction(data) {
  return request({
    url: '/mis/function/edit',
    method: 'post',
    data: data
  })
}

// 删除功能列表
export function delFunction(ctFunNo) {
  return request({
    url: '/mis/function/delete/' + ctFunNo,
    method: 'post'
  })
}

// 导出功能列表
export function exportFunction(query) {
  return request({
    url: '/mis/function/export',
    method: 'get',
    params: query
  })
}

export function cacheClear(query) {
  return request({
    url: '/mis/cache/clear',
    method: 'get',
    params: query
  })
}

